<div class="panel panel-primary">
    <div class="panel-heading">
        <h2 class="panel-title">{{ image.title }}</h2>
    </div>
    <div class="panel-body">
        <p>{{ image.description }}</p>
        <div class="col-md-12 text-center">
            <img src="/public/upload/{{image.filename}}" class="img-thumbnail">
        </div>
    </div>
    <div class="panel-footer">
        <div class="row">
            <div class="col-md-8">
                <button class="btn btn-success" id="btn-like" data-id="{{ image.uniqueId }}"><i class="fa fa-heart"> 点&nbsp;赞</i></button>
                <strong class="likes-count">{{ image.likes }}</strong> &nbsp; - &nbsp; <i class="fa fa-eye"></i> <strong>{{ image.views }}</strong>
                &nbsp; - &nbsp; 发&nbsp;表: <em class="text-muted">{{ timeago image.timestamp }}</em>
            </div>
        </div>
    </div>
</div>


<div class="panel panel-default">
    <div class="panel-heading">
        <div class="row">
            <div class="col-md-8">
                <strong class="panel-title">评&nbsp;论</strong>
            </div>
            <div class="col-md-4 text-right">
                <button class="btn btn-default btn-sm" id="btn-comment" data-id="{{ image.uniqueId }}"><i class="fa fa-comments-o"> 发表评论...</i></button>
            </div>
        </div>
    </div>
    <div class="panel-body">
        <blockquote id="post-comment">
            <div class="row">
                <form method="post" action="/images/{{ image.uniqueId }}/comment">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label" for="name">姓&nbsp;名:</label>
                        <div class="col-sm-10">
                            <input class="form-control" type="text" name="name">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label" for="email">邮&nbsp;箱:</label>
                        <div class="col-sm-10">
                            <input class="form-control" type="text" name="email">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label" for="comment">评&nbsp;论:</label>
                        <div class="col-sm-10">
                            <textarea class="form-control" name="comment" rows="2"></textarea>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <div class="col-sm-12 text-right">
                            <button type="submit" id="comment-btn" class="btn btn-success" type="button"><i class="fa fa-comment"></i> 提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </blockquote>
        <ul class="media-list">
            {{#each comments}}
                <li class="media">
                    <a class="pull-left" href="#">
                        <img class="media-object img-circle" src="http://www.gravatar.com/avatar/{{gravatar}}?d=monsterid&s=45">
                    </a>
                    <div class="media-body">
                        {{ comment }}
                        <br/><strong class="media-heading">{{ name }}</strong> <small class="text-muted">{{ timeago timestamp }}</small>
                    </div>
                </li>
            {{/each}}
        </ul>

    </div>
</div>
